package com.web.music.xml;

import org.xml.sax.ErrorHandler;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;

import com.web.music.common.MusicException;

public class MusicXmlErrorHandler implements ErrorHandler {

	public void error(SAXParseException e) throws SAXException {
		System.err.println(e);
		throw new MusicException(e);
	}

	public void fatalError(SAXParseException e) throws SAXException {
		System.err.println(e);
		throw new MusicException(e);
	}

	public void warning(SAXParseException e) throws SAXException {
		System.out.println(e.getMessage());
	}

}
